package com.sea.human.service.impl;

import com.sea.human.entity.PerformanceCheck;
import com.sea.human.entity.PerformanceRecord;
import com.sea.human.mapper.PerformanceCheckMapper;
import com.sea.human.mapper.PerformanceRecordMapper;
import com.sea.human.service.PerformanceCheckService;
import com.sea.human.service.PerformanceRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author 陈鸿飞
 */
@Service
public class PerformanceRecordServiceImpl implements PerformanceRecordService {

    @Autowired
    private PerformanceRecordMapper performanceRecordMapper;

    @Override
    public List<PerformanceRecord> findByCnd(Integer performanceId) {
        return performanceRecordMapper.findByCnd(performanceId);
    }

    @Override
    public int save(Integer performanceId, Integer performanceStatus, String performanceOperate, String performanceRemark) {
        PerformanceRecord performanceRecord=new PerformanceRecord();
        performanceRecord.setPerformanceId(performanceId);
        performanceRecord.setPerformanceStatus(performanceStatus);
        performanceRecord.setPerformanceOperate(performanceOperate);
        performanceRecord.setPerformanceRemark(performanceRemark);
        return performanceRecordMapper.insert(performanceRecord);
    }
}
